package com.teach.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName tb_order
 */
@TableName(value ="tb_order")
@Data
@Accessors(chain = true)//链式开发
/**
 * 链式开发底层基于链表
 * 链表底层增删快
 */
@AllArgsConstructor
@NoArgsConstructor

@ApiModel(value = "订单信息",description = "订单的生成及使用")
public class TbOrder implements Serializable {
    /**
     * 涓婚敭
     */
    @ApiModelProperty(value = "主键id")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 订单名称
     */
    @ApiModelProperty(value = "订单名称")
    private String name;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "支付金额")
    private Long price;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    private String orderNumber;

    /**
     * 
     */
    @ApiModelProperty(value = "生成时间")
    private Date createTime;

    /**
     * 订单支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    /**
     * 鏀粯鐘舵€?
     */
    @ApiModelProperty(value = "支付状态")
    private Integer payState;

    /**
     * 鏀粯鏂瑰紡
     */
    @ApiModelProperty(value = "支付方式")
    private Integer payWay;

    /**
     * 鐢ㄦ埛涓婚敭
     */
    @ApiModelProperty(value = "用户id")
    private Integer userId;

    /**
     * 课程主键
     */
    @ApiModelProperty(value = "课程id")
    private Integer courseId;

    /**
     * 流水号
     */
    @ApiModelProperty(value = "流水号")
    private String serialNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}